//鎸塵ars3d瑙勮寖锛屽皢CesiumVectorTile灏佽涓�

import * as mars3d from "mars3d"

import { CesiumVectorTile } from './CesiumVectorTile'
class WeiVectorTileLayer extends mars3d.layer.BaseTileLayer {
    //鏋勫缓ImageryProvider
    async _createImageryProvider(options) {
        return createImageryProvider(options)
    }
}
async function createImageryProvider(options) {
    let provider = new CesiumVectorTile.VectorTileImageryProvider(options) //CesiumVectorTile.js涓�
    await provider.readyPromise
    return provider
}
WeiVectorTileLayer.createImageryProvider = createImageryProvider

//娉ㄥ唽涓�
const layerType = "weiVectorTile" //鍥惧眰绫诲瀷
mars3d.LayerUtil.register(layerType, WeiVectorTileLayer)
mars3d.LayerUtil.registerImageryProvider(layerType, createImageryProvider)

//瀵瑰鎺ュ彛
mars3d.layer.WeiVectorTileLayer = WeiVectorTileLayer
export { WeiVectorTileLayer }